﻿<UserControl x:Class="NopControls.ExpandableTab"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Loaded="UserControl_Loaded"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <Storyboard x:Name="mouseOverStoryboard">
            <DoubleAnimation To="0.9" Storyboard.TargetName="buttonTextScale" Storyboard.TargetProperty="ScaleX" Duration="0:0:0.1"/>
            <DoubleAnimation To="0.9" Storyboard.TargetName="buttonTextScale" Storyboard.TargetProperty="ScaleY" Duration="0:0:0.1"/>
        </Storyboard>
        <Storyboard x:Name="mouseOutStoryboard">
            <DoubleAnimation To="1.0" Storyboard.TargetName="buttonTextScale" Storyboard.TargetProperty="ScaleX" Duration="0:0:0.1"/>
            <DoubleAnimation To="1.0" Storyboard.TargetName="buttonTextScale" Storyboard.TargetProperty="ScaleY" Duration="0:0:0.1"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid>
        <Grid.RenderTransform>
            <TranslateTransform x:Name="globalTransform"/>
        </Grid.RenderTransform>
        <Grid x:Name="headerZone" MouseLeftButtonDown="headerZone_MouseLeftButtonDown" MouseEnter="headerZone_MouseEnter" MouseLeave="headerZone_MouseLeave">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="headerTransform"/>
            </Grid.RenderTransform>
            <Border BorderBrush="Black" BorderThickness="1" CornerRadius="4" Background="White" x:Name="headerBorder">
                <Border.Effect>
                    <DropShadowEffect Opacity="0.5" BlurRadius="5" />
                </Border.Effect>
                <ContentControl x:Name="headerContent" VerticalAlignment="Center" HorizontalAlignment="Center" RenderTransformOrigin="0.5, 0.5">
                    <ContentControl.RenderTransform>
                        <ScaleTransform x:Name="buttonTextScale" ScaleX="1" ScaleY="1"/>
                    </ContentControl.RenderTransform>
                </ContentControl>
            </Border>
        </Grid>
        <Border BorderBrush="Black" BorderThickness="1" x:Name="border" Background="White">
        </Border>
        <Rectangle x:Name="backRectangle" Fill="White">
            <Rectangle.RenderTransform>
                <TranslateTransform x:Name="backRectangleTransform"/>
            </Rectangle.RenderTransform>
        </Rectangle>
        <ContentControl x:Name="content" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
    </Grid>
</UserControl>
